﻿
using System;
using com.guojin.core.io;
using com.guojin.core.io.message;
namespace com.guojin.mj.net.message.login
{
    public class SHRoomHistoryUser : Message
    {
        public static int TYPE = 7;
        public static int ID = 24;

        private string _userName;
        private string _avatar;
        private int _userID;
        private int _locationIndex;
        private int _score;

        public string UserName
        {
            get
            {
                return _userName;
            }

            set
            {
                _userName = value;
            }
        }

        public string Avatar
        {
            get
            {
                return _avatar;
            }

            set
            {
                _avatar = value;
            }
        }

        public int UserID
        {
            get
            {
                return _userID;
            }

            set
            {
                _userID = value;
            }
        }

        public int LocationIndex
        {
            get
            {
                return _locationIndex;
            }

            set
            {
                _locationIndex = value;
            }
        }

        public int Score
        {
            get
            {
                return _score;
            }

            set
            {
                _score = value;
            }
        }

        public SHRoomHistoryUser()
        {     
        }

        public void decode(Input _in)
        {
            _userName = _in.readString();
            _avatar = _in.readString();
            _userID = _in.readInt();
            _locationIndex = _in.readInt();
            _score = _in.readInt();
        }

        public void encode(Output _out)
        {
        }

        public int getMessageId()
        {
            return ID;
        }
        public int getMessageType()
        {
            return TYPE;
        }
        public string toString()
        {
            return "SHRoomHistoryUser [userName=" + _userName + ",avatar =" + _avatar + ",userID=" + _userID + ",UserID=" + _locationIndex + ",scores=" + _score + ", ]";
        }
    }
}
